package com.zelix;

import java.io.*;
import java.util.BitSet;

public class vd extends kd
{

    static final vd g[][];
    int h;
    private static String z;

    public vd(int i, int k)
    {
        super(i);
        h = k;
    }

    public vd(int i, jb jb)
        throws IOException
    {
        super(i);
        h = jb.readUnsignedByte();
    }

    public sn a(sn sn1, boolean flag, boolean flag1, um um)
    {
        wn awn[];
        wn awn1[];
        int i;
        e1 e1_1;
        e1 e1_2;
label0:
        {
            int l = kd.e;
            awn = sn1.f();
            awn1 = sn1.c();
            Object obj = null;
            i = awn1.length;
            e1_1 = sn1.e();
            if(e1_1 != null)
            {
                switch(super.d)
                {
                case 21: // '\025'
                case 23: // '\027'
                case 25: // '\031'
                case 54: // '6'
                case 56: // '8'
                case 58: // ':'
                case 132: 
                case 169: 
                    if(e1_1.get(h))
                    {
                        e1_2 = e1_1;
                        if(l == 0)
                            break label0;
                    }
                    e1_2 = (e1)e1_1.clone();
                    e1_2.set(h);
                    if(l == 0)
                        break label0;
                    // fall through

                case 22: // '\026'
                case 24: // '\030'
                case 55: // '7'
                case 57: // '9'
                    if(e1_1.get(h) && e1_1.get(h + 1))
                    {
                        e1_2 = e1_1;
                        if(l == 0)
                            break label0;
                    }
                    e1_2 = (e1)e1_1.clone();
                    e1_2.set(h);
                    e1_2.set(h + 1);
                    if(l == 0)
                        break label0;
                    // fall through

                default:
                    lx.b(false, super.d);
                    e1_2 = null;
                    break;
                }
                if(l == 0)
                    break label0;
            }
            e1_2 = null;
        }
        switch(super.d)
        {
        case 21: // '\025'
            wn awn2[] = wn.a(i + 1);
            System.arraycopy(awn1, 0, awn2, 0, i);
            awn2[i] = wn.i;
            return new sn(awn2, awn, e1_2);

        case 22: // '\026'
            wn awn3[] = wn.a(i + 1);
            System.arraycopy(awn1, 0, awn3, 0, i);
            awn3[i] = wn.j;
            return new sn(awn3, awn, e1_2);

        case 23: // '\027'
            wn awn4[] = wn.a(i + 1);
            System.arraycopy(awn1, 0, awn4, 0, i);
            awn4[i] = wn.k;
            return new sn(awn4, awn, e1_2);

        case 24: // '\030'
            wn awn5[] = wn.a(i + 1);
            System.arraycopy(awn1, 0, awn5, 0, i);
            awn5[i] = wn.l;
            return new sn(awn5, awn, e1_2);

        case 25: // '\031'
            wn awn6[] = wn.a(i + 1);
            System.arraycopy(awn1, 0, awn6, 0, i);
            awn6[i] = awn[h];
            return new sn(awn6, awn, e1_2);

        case 54: // '6'
            return b(i, awn1, awn, wn.i, e1_1);

        case 56: // '8'
            return b(i, awn1, awn, wn.k, e1_1);

        case 58: // ':'
            int k = awn.length;
            wn awn8[] = wn.a(k);
            System.arraycopy(awn, 0, awn8, 0, k);
            if(awn8[h].equals(wn.o) && (awn8[h - 1].equals(wn.j) || awn8[h - 1].equals(wn.l)))
            {
                awn8[h - 1] = wn.m;
                if(e1_2 != null)
                    e1_2.set(h - 1);
            }
            if(awn8[h].equals(wn.j) || awn8[h].equals(wn.l))
            {
                awn8[h + 1] = wn.m;
                if(e1_2 != null)
                    e1_2.set(h + 1);
            }
            awn8[h] = awn1[i - 1];
            wn awn7[] = wn.a(i - 1);
            System.arraycopy(awn1, 0, awn7, 0, i - 1);
            return new sn(awn7, awn8, e1_2);

        case 132: 
            if(e1_2 == null || e1_2 == e1_1)
                return sn1;
            else
                return new sn(sn1.c(), sn1.f(), e1_2);

        case 169: 
            if(e1_2 == null || e1_2 == e1_1)
                return sn1;
            else
                return new sn(sn1.c(), sn1.f(), e1_2);

        case 55: // '7'
            return a(i, awn1, awn, wn.j, e1_1);

        case 57: // '9'
            return a(i, awn1, awn, wn.l, e1_1);
        }
        lx.b(false, z + super.d);
        return null;
    }

    public final boolean b()
    {
        switch(super.d)
        {
        case 21: // '\025'
        case 22: // '\026'
        case 23: // '\027'
        case 24: // '\030'
        case 25: // '\031'
        case 54: // '6'
        case 55: // '7'
        case 56: // '8'
        case 57: // '9'
        case 58: // ':'
        case 132: 
            return true;

        case 169: 
            return false;
        }
        lx.b(false, z + super.d);
        return false;
    }

    public final boolean a(int i, int k)
    {
        switch(super.d)
        {
        case 21: // '\025'
        case 22: // '\026'
        case 23: // '\027'
        case 24: // '\030'
        case 25: // '\031'
        case 132: 
        case 169: 
            return false;

        case 54: // '6'
        case 55: // '7'
        case 56: // '8'
        case 57: // '9'
        case 58: // ':'
            return i >= k;
        }
        lx.b(false, z + super.d);
        return false;
    }

    private sn a(int i, wn awn[], wn awn1[], wn wn1, e1 e1_1)
    {
        wn awn2[] = wn.a(i - 1);
        System.arraycopy(awn, 0, awn2, 0, i - 1);
        int k = awn1.length;
        wn awn3[] = wn.a(k);
        System.arraycopy(awn1, 0, awn3, 0, k);
        if(awn3[h].equals(wn.o) && (awn3[h - 1].equals(wn.j) || awn3[h - 1].equals(wn.l)))
            awn3[h - 1] = wn.m;
        awn3[h] = wn1;
        wn wn2 = awn3[h + 1];
        awn3[h + 1] = wn.o;
        if(wn2.equals(wn.j) || wn2.equals(wn.l))
        {
            awn3[h + 2] = wn.m;
            if(e1_1 != null)
                e1_1.set(h + 2);
        }
        return new sn(awn2, awn3, e1_1);
    }

    public boolean a(int i)
    {
        switch(super.d)
        {
        case 21: // '\025'
        case 22: // '\026'
        case 23: // '\027'
        case 24: // '\030'
        case 25: // '\031'
            return h == i;

        case 54: // '6'
        case 55: // '7'
        case 56: // '8'
        case 57: // '9'
        case 58: // ':'
        case 132: 
        case 169: 
            return false;
        }
        lx.b(false, z + super.d);
        return false;
    }

    public final boolean c()
    {
        switch(super.d)
        {
        case 169: 
            return true;

        case 21: // '\025'
        case 22: // '\026'
        case 23: // '\027'
        case 24: // '\030'
        case 25: // '\031'
        case 54: // '6'
        case 55: // '7'
        case 56: // '8'
        case 57: // '9'
        case 58: // ':'
        case 132: 
            return false;
        }
        lx.b(false, z + super.d);
        return false;
    }

    public final boolean b(int i)
    {
        switch(super.d)
        {
        case 54: // '6'
        case 55: // '7'
        case 56: // '8'
        case 57: // '9'
        case 58: // ':'
            return h == i;

        case 21: // '\025'
        case 22: // '\026'
        case 23: // '\027'
        case 24: // '\030'
        case 25: // '\031'
        case 132: 
        case 169: 
            return false;
        }
        lx.b(false, z + super.d);
        return false;
    }

    public void a(PrintWriter printwriter, StringBuffer stringbuffer, int i)
    {
        StringBuffer stringbuffer1 = new StringBuffer(100);
        String s = kd.h(super.d);
        stringbuffer1.append(s + " " + h);
        String s1 = kd.e(super.d);
        s1 = kd.a(s1, String.valueOf(h));
        if(s1 != null)
            stringbuffer1.append("\t" + s1);
        printwriter.println(stringbuffer.toString() + stringbuffer.toString() + stringbuffer1);
    }

    public int d()
    {
        return 2;
    }

    public int a()
    {
        return h;
    }

    public static vd e(int i, int k)
    {
        vd avd[] = g[i];
        if(avd == null)
        {
            avd = new vd[31];
            g[i] = avd;
        }
        if(k <= 30)
        {
            vd vd1 = avd[k];
            if(vd1 == null)
            {
                vd1 = new vd(i, k);
                avd[k] = vd1;
            }
            return vd1;
        } else
        {
            return new vd(i, k);
        }
    }

    public final boolean j()
    {
        switch(super.d)
        {
        case 54: // '6'
        case 55: // '7'
        case 56: // '8'
        case 57: // '9'
        case 58: // ':'
            return true;

        case 21: // '\025'
        case 22: // '\026'
        case 23: // '\027'
        case 24: // '\030'
        case 25: // '\031'
        case 132: 
        case 169: 
            return false;
        }
        lx.b(false, z + super.d);
        return false;
    }

    public final boolean o()
    {
        switch(super.d)
        {
        case 21: // '\025'
        case 22: // '\026'
        case 23: // '\027'
        case 24: // '\030'
        case 25: // '\031'
            return true;

        case 54: // '6'
        case 55: // '7'
        case 56: // '8'
        case 57: // '9'
        case 58: // ':'
        case 132: 
        case 169: 
            return false;
        }
        lx.b(false, z + super.d);
        return false;
    }

    private sn b(int i, wn awn[], wn awn1[], wn wn1, e1 e1_1)
    {
        wn awn2[] = wn.a(i - 1);
        System.arraycopy(awn, 0, awn2, 0, i - 1);
        int k = awn1.length;
        wn awn3[] = wn.a(k);
        System.arraycopy(awn1, 0, awn3, 0, k);
        if(awn3[h].equals(wn.o) && (awn3[h - 1].equals(wn.j) || awn3[h - 1].equals(wn.l)))
        {
            awn3[h - 1] = wn.m;
            if(e1_1 != null)
                e1_1.set(h - 1);
        }
        if(awn3[h].equals(wn.j) || awn3[h].equals(wn.l))
        {
            awn3[h + 1] = wn.m;
            if(e1_1 != null)
                e1_1.set(h + 1);
        }
        awn3[h] = wn1;
        return new sn(awn2, awn3, e1_1);
    }

    public void a(DataOutputStream dataoutputstream)
        throws IOException
    {
        super.a(dataoutputstream);
        dataoutputstream.writeByte(h);
    }

    private static String z(char[] chs) {
        for (int i = 0; i < chs.length; i++) {
            byte key = 0;
            switch (i % 5) {
                case 0:
                    key = 3;
                    break;
                case 1:
                    key = 92;
                    break;
                case 2:
                    key =117;
                    break;
                case 3:
                    key =21;
                    break;
                default:
                    key =41;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }


    static 
    {
        z = z("j2\003tEj8UzY`3\021p\t".toCharArray());
        g = new vd[59][];
    }
}